1. Field of the Invention
This invention relates to filtering the gray scale values for the pixels of a digitized image, and in particular to adjusting the gray scale values using anisotropic filter kernels separately oriented for each pixel dependent upon local conditions surrounding that pixel. The invention also encompasses biasing the pixel values as a function of the average gray scale value of pixels under the kernel to locally modify brightness without substantially affecting contrast.
2. Background Information
It is common practice to employ digital filters to enhance or to suppress particular features in digital image data, for instance, to suppress noise or to enhance line definition. Such filters employ a kernel comprising a matrix of coefficients which operates on the gray scale values of pixels surrounding the pixel value being modified.
Systems have been proposed to automatically select a filter function for the individual pixels in the digitized image dependent upon the gray scale values of pixels surrounding the pixel to which the filter function is being applied. One such system disclosed in U.S. Pat. No. 4,783,840 determines from the gray scale values of eight pixels surrounding a pixel value to be enhanced whether to apply a low pass filter function or a high pass filter function. Thus, the filter function applied depends upon the local conditions. Another system disclosed in U.S. Pat. No. 4,691,336 and directed to a technique for enhancing digital fluorograph images, utilizes a low pass filter to reduce noise and if an edge is identified by an edge identifier, a high pass filter is also applied to the pixel data. The low pass and high pass filters utilized in these patented systems are designed to solve some specific objectives, but lack universal applicability, both in type of filtering operation and size of the operating kernel area.
While the averaging function performed by low pass filters reduces noise, it tends to blur line definition when applied in a direction perpendicular to a line in an image. On the other hand, while high pass filters enhance line definition when applied across a line feature, they accentuate noise and tend to break up a line when applied parallel to the line. Hence, there are applications where isotropic filters can enhance an image in some aspects but degrade it in other respects.
Anisotropic filter kernels, which have different filtering characteristics in different axes, have been applied to digital data sets. However, the anisotropic property of such kernels, in general, requires local adaptation in order to produce the desired results. Until now, this has usually been done with human interaction because it has not been found feasible to automate the required decision making. This has made it unpracticable to adapt an anisotropic filter for each individual pixel in any reasonably sized digital display.
It has also been noted that in some digital images, there may be some areas in which it is desirable to brighten or darken a selected area or to brighten some areas and darken others. This may be done, for instance, to remove a shadow or non-uniform illumination, or to emphasize a particular feature of the image. It would be desirable if this could be performed on a pixel by pixel basis automatically and without affecting contrast.
There is a need therefore for a method and apparatus for applying an anisotropic filter to digital image gray scale values which automatically adapts for the conditions around each pixel of the image or at least the pixels in a significant portion of the image.
In particular, there is need for such a method and apparatus which automatically aligns an anisotropic filter based upon the gray scale values of pixels surrounding the pixel to which the filter is being applied.
There is a companion need for a method and apparatus for biasing gray scale values for pixels in a digital image to locally adjust brightness across the image.
There is a subordinate need for such a method and system for biasing gray scale values which does not substantially affect contrast.